﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/MasterMng.master" AutoEventWireup="true" CodeFile="InsertExpert.aspx.cs" Inherits="ExpertManager_InsertExpert" %>


<asp:Content ID="Content1" ContentPlaceHolderID="Header1" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div style="background-color:#CCCCFF;direction:rtl;padding-bottom:20px;padding-top:10px;border:1px solid #ccc;box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.075) inset;border-radius: 4px;color:#000066">
        <div style="padding-right:385px; width:100%">
        <asp:Image ID="Image2" runat="server" 
                        ImageUrl="~/Images/ManageUsers.png" Width="17%"  />
        </div>
     
      
        <div style="width:93%;margin:auto;background-color:#CC99FF;border:1px solid #ccc;box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.075) inset;border-radius: 7px;">
       
        <div style="background-color:#9966FF;border-radius: 7px;text-align:center;height:30px">
         <asp:Label ID="Label12" runat="server" Font-Size="14px" ForeColor="#FFFF99" 
                    Text="معرفی کارشناسان "></asp:Label>
        </div>
          <div >
          
       <table style="width: 100%;direction:rtl"  >
       
        <tr>
        <td></td>
        </tr>
        <tr>
            <td align="right" style="width: 74px; height: 25px;padding-right:8px">
                <asp:Label ID="Label1" runat="server" Text="نام کارشناس"></asp:Label>
            </td>
            <td align="right" style="width: 110px; height: 25px;">
                <asp:TextBox ID="Txname" runat="server" TabIndex="1" Font-Size="Medium" 
                    Width="166px" onBlur="if(this.value=='')this.value='نام'" 
                    onFocus="if(this.value=='نام')this.value='' " CssClass="textbox"></asp:TextBox>
            </td>
            <td align="right" style="width: 8px; height: 25px;">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate="Txname" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
            </td>
            <td align="right" style="width: 118px; height: 25px;">
                </td>
            <td align="right" class="style1" style="height: 25px; width: 67px">
                <asp:Label ID="Label4" runat="server" Text="شماره موبایل"></asp:Label>
            </td>
            <td align="right" class="style1" style="height: 25px; width: 141px;">
                <asp:TextBox ID="TxMobile" runat="server" TabIndex="8" Font-Size="Medium" 
                    Width="166px" onBlur="if(this.value=='')this.value='شماره موبایل'" 
                    onFocus="if(this.value=='شماره موبایل')this.value='' " CssClass="textbox"></asp:TextBox>
            </td>
            <td align="right" style="height: 25px;">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                    ControlToValidate="TxMobile" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
            </td>
            <td align="left" style="height: 25px">
                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                    ControlToValidate="TxMobile" ErrorMessage="فرمت وارد شده صحیح نیست" 
                    ForeColor="Red" ValidationExpression="09(1[0-9]|3[0-9])[0-9]{7}"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td align="right" style="width: 74px; height: 2px;padding-right:8px">
                <asp:Label ID="Label2" runat="server" Text="نام خانوادگی"></asp:Label>
            </td>
            <td align="right" style="width: 110px; height: 2px;">
                
                <asp:TextBox ID="txfamily" runat="server" TabIndex="2" Font-Size="Medium" 
                    Width="166px" onBlur="if(this.value=='')this.value='نام خانوادگی'" 
                    onFocus="if(this.value=='نام خانوادگی')this.value='' " CssClass="textbox"></asp:TextBox>
            </td>
            <td align="right" style="width: 8px; height: 2px;">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                    ControlToValidate="txfamily" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
            </td>
            <td align="right" style="width: 118px; height: 2px;">
                </td>
            <td align="right" class="style1" style="height: 2px; width: 67px">
                <asp:Label ID="Label5" runat="server" Text="شماره تلفن"></asp:Label>
            </td>
            <td align="right" style="height: 2px; width: 141px;" class="style1">
                <asp:TextBox ID="Txtele" runat="server" TabIndex="9" Font-Size="Medium" 
                    Width="166px" onBlur="if(this.value=='')this.value='شماره تلفن'" 
                    onFocus="if(this.value=='شماره تلفن')this.value='' " CssClass="textbox"></asp:TextBox>
            </td>
            <td align="right" style="height: 2px;" class="style1">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
                    ControlToValidate="Txtele" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
            </td>
            <td align="left" style="height: 2px" class="style1">
                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                    ControlToValidate="Txtele" ErrorMessage="عدد وارد کنید" ForeColor="Red" 
                    ValidationExpression="[0-9]+"></asp:RegularExpressionValidator>
                </td>
        </tr>
        <tr>
            <td align="right" style="width: 74px; height: 2px;padding-right:8px">
                <asp:Label ID="Label3" runat="server" Text="آدرس"></asp:Label>
            </td>
            <td align="right" style="width: 110px; height: 2px;">
                <asp:TextBox ID="Txaddress" runat="server" TabIndex="3" Font-Size="Medium" 
                    Width="166px" onBlur="if(this.value=='')this.value='آدرس'" 
                    onFocus="if(this.value=='آدرس')this.value='' " CssClass="textbox"></asp:TextBox>
            </td>
            <td align="right" style="width: 8px; height: 2px;">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                    ControlToValidate="Txaddress" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
            </td>
            <td align="right" style="width: 118px; height: 2px;">
                &nbsp;</td>
            <td align="right" class="style1" style="height: 2px; width: 67px">
                <asp:Label ID="Label6" runat="server" Text="کد ملی"></asp:Label>
            </td>
            <td align="right" class="style1" style="height: 2px; width: 141px;">
                <asp:TextBox ID="TxNationCode" runat="server" TabIndex="10" Font-Size="Medium" 
                    Width="166px" onBlur="if(this.value=='')this.value='کدملی'" 
                    onFocus="if(this.value=='کدملی')this.value='' " CssClass="textbox"></asp:TextBox>
            </td>
            <td align="right" style="height: 2px;">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" 
                    ControlToValidate="TxNationCode" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
            </td>
            <td align="left" style="height: 2px">
                <asp:RegularExpressionValidator ID="RegularExpressionValidator6" runat="server" 
                    ErrorMessage="حداقل 9 کاراکتر وارد کنید" ForeColor="Red" 
                    ValidationExpression=".{9,}" ControlToValidate="TxNationCode" ></asp:RegularExpressionValidator>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" 
                    ControlToValidate="TxNationCode" ErrorMessage="عدد وارد کنید" ForeColor="Red" 
                    ValidationExpression="[0-9]+"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td align="right" style="height: 17px; width: 74px;padding-right:8px">
                <asp:Label ID="Label8" runat="server" Text="آدرس ایمیل"></asp:Label>
            </td>
            <td align="right" style="height: 17px; width: 110px">
                <asp:TextBox ID="Txmail" runat="server" TabIndex="4" Font-Size="Medium" 
                    Width="166px" onBlur="if(this.value=='')this.value='آدرس ایمیل'" 
                    onFocus="if(this.value=='آدرس ایمیل')this.value='' " CssClass="textbox"></asp:TextBox>
            </td>
            <td align="right" style="height: 17px; width: 8px">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                    ControlToValidate="Txmail" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
            </td>
            <td align="right" style="height: 17px; width: 118px">
                <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" 
                    ErrorMessage="فرمت وارد شده صحیح نیست" ControlToValidate="Txmail" 
                    ForeColor="Red" 
                    ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ></asp:RegularExpressionValidator> 
            </td>
            <td align="right" class="style2" style="width: 67px">
                <asp:Label ID="Label7" runat="server" Text="از شهرستان"></asp:Label>
            </td>
            <td align="right" style="width: 141px">
                <asp:DropDownList ID="DropDownList1" runat="server" 
                    DataSourceID="SqlDataSource2" DataTextField="ProvinceName" DataValueField="ID" 
                    TabIndex="11" CssClass="textbox">
                </asp:DropDownList>
                <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:CON %>"  
                    ProviderName="System.Data.SqlClient" 
                    SelectCommand="SELECT [ID], [ProvinceName] FROM [TblProvince]">
                </asp:SqlDataSource>
            </td>
            <td align="right" style="height: 17px; ">
                &nbsp;</td>
            <td align="left" style="height: 17px">
                &nbsp;</td>
        </tr>
        <tr>
            <td align="right" style="height: 17px; width: 74px;padding-right:8px">
                <asp:Label ID="Label9" runat="server" Text="نام کاربری"></asp:Label>
            </td>
            <td align="right" style="height: 17px; width: 110px">
                <asp:TextBox ID="Txusername" runat="server" TabIndex="5" Font-Size="Medium" 
                    Width="166px" onBlur="if(this.value=='')this.value='نام کاربری'" 
                    onFocus="if(this.value=='نام کاربری')this.value='' " CssClass="textbox"></asp:TextBox>
            </td>
            <td align="right" style="height: 17px; width: 8px">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" 
                    ControlToValidate="Txusername" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
            </td>
            <td align="right" style="height: 17px; width: 118px">
                &nbsp;</td>
            <td align="right" class="style2" style="width: 67px">
                &nbsp;</td>
            <td align="right" style="width: 141px">
                &nbsp;</td>
            <td align="right" style="height: 17px; ">
                &nbsp;</td>
            <td align="left" style="height: 17px">
                &nbsp;</td>
        </tr>
        <tr>
            <td align="right" style="height: 17px; width: 74px;padding-right:8px">
                <asp:Label ID="Label10" runat="server" Text="کلمه عبور"></asp:Label>
            </td>
            <td align="right" style="height: 17px; width: 110px">
                <asp:TextBox ID="Txpass" runat="server" TabIndex="6" TextMode="Password" 
                    onBlur="if(this.value=='')this.value='رمز'" 
                    onFocus="if(this.value=='رمز')this.value='' " CssClass="textbox"></asp:TextBox>
            </td>
            <td align="right" style="height: 17px; width: 8px">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server" 
                    ControlToValidate="Txpass" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
            </td>
            <td align="right" style="height: 17px; width: 118px">
                <asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server" 
                    ErrorMessage="حداقل 6 کاراکتر وارد کنید" ForeColor="Red" 
                    ValidationExpression=".{6,}" ControlToValidate="Txpass" ></asp:RegularExpressionValidator>
            </td>
            <td align="right" class="style2" style="width: 67px">
                &nbsp;</td>
            <td align="right" style="width: 141px">
                <asp:Button ID="BtnReg" runat="server" Height="24px" style="margin-left: 0px" 
                    Text="ثبت" Width="109px" onclick="BtnReg_Click" TabIndex="12" 
                    CssClass="Button" />
            </td>
            <td align="right" style="height: 17px; ">
                &nbsp;</td>
            <td align="left" style="height: 17px">
                &nbsp;</td>
        </tr>
        <tr>
            <td align="right" style="height: 17px; width: 74px;padding-right:8px">
                <asp:Label ID="Label11" runat="server" Text="تکرار رمز عبور"></asp:Label>
            </td>
            <td align="right" style="height: 17px; ">
                <asp:TextBox ID="Txconf" runat="server" TabIndex="7" TextMode="Password" 
                    onBlur="if(this.value=='')this.value='تکرار رمز'" 
                    onFocus="if(this.value=='تکرار رمز')this.value='' " CssClass="textbox"></asp:TextBox>
            </td>
            <td align="right" style="height: 17px; width: 8px;">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" 
                    ControlToValidate="Txconf" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
            </td>
            <td align="right" style="height: 17px; width: 118px">
                <asp:CompareValidator ID="CompareValidator1" runat="server" 
                     ErrorMessage="تکرار رمز اشتباه" ControlToValidate="Txconf" 
                    ControlToCompare="Txpass" ForeColor="Red"></asp:CompareValidator>
            </td>
            <td align="right" class="style2" style="width: 67px">
                &nbsp;</td>
            <td align="right" style="width: 141px">
                <asp:Label ID="Lbl" runat="server" BackColor="Yellow" BorderColor="Red" 
                    ForeColor="Red"></asp:Label>
                <asp:Label ID="LBLStatus" runat="server" BackColor="#3399FF" 
                    BorderColor="#FFFF66" ForeColor="Yellow"></asp:Label>
            </td>
            <td align="right" style="height: 17px; ">
                &nbsp;</td>
            <td align="left" style="height: 17px">
                &nbsp;</td>
        </tr>
        <tr><td>
        <br />
        <br />
        </td></tr>
        <tr>
            <td align="right" colspan="8">
                   <div style="border: 1px solid #DEDEDE;border-radius:3px;box-shadow: 0px 0px 10px rgba(189, 189, 189, 0.4);padding :10px;width:85%;margin:auto;">
                   
                <div  class="headerTable" >
                <div style="width:10%;float:right">
                    <asp:Image ID="Image1" runat="server" src="../Images/ava_default_1.jpg" Height="40px" />
                </div>
                <div style="width:50%;float:right">
                    <h3><asp:Label ID="Label13" runat="server" Text="اطلاعات کاربران ثبت شده"></asp:Label></h3>
                </div>
                
                
                </div>
                <div  >
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                    CellPadding="3" DataSourceID="Expert" 
                    Width="100%" AllowPaging="True" AllowSorting="True" BackColor="White" 
                    BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px">
                    <Columns>
                    <asp:BoundField DataField="UserName" HeaderText="نام کاربری" 
                            SortExpression="UserName" />
                            <asp:BoundField DataField="Name" HeaderText="نام کارشناس" 
                            SortExpression="Name" />
                             <asp:BoundField DataField="Family" HeaderText="نام خانوادگی" 
                            SortExpression="Family" />
                              <asp:BoundField DataField="NationalCode" HeaderText="کد ملی" 
                            SortExpression="NationalCode" />
                        <asp:BoundField DataField="ProvinceName" HeaderText="نام شهرستان" 
                            SortExpression="ProvinceName" />
                          <asp:BoundField DataField="Address" HeaderText="آدرس" 
                            SortExpression="Address" />
                      
                        <asp:BoundField DataField="Mobile" HeaderText="شماره موبایل" 
                            SortExpression="Mobile" />
                        <asp:BoundField DataField="Telephone" HeaderText="شماره تلفن" 
                            SortExpression="Telephone" />
                      
                        <asp:BoundField DataField="EmailAddress" HeaderText="آدرس ایمیل" 
                            SortExpression="EmailAddress" />
                        
                    </Columns>
                    <FooterStyle BackColor="White" ForeColor="#000066" />
                    <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                    <RowStyle ForeColor="#000066" />
                    <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                    <SortedAscendingCellStyle BackColor="#F1F1F1" />
                    <SortedAscendingHeaderStyle BackColor="#007DBB" />
                    <SortedDescendingCellStyle BackColor="#CAC9C9" />
                    <SortedDescendingHeaderStyle BackColor="#00547E" />
                </asp:GridView>
                </div>
                </div>
                
                <asp:SqlDataSource ID="Expert" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:CON %>"
                    ProviderName="System.Data.SqlClient" 
                    
                    
                    SelectCommand="SELECT [ProvinceName], [Name], [Family], [Address], [Mobile], [Telephone], [NationalCode], [EmailAddress], [UserName] FROM [ExpProvince]">
                </asp:SqlDataSource>
            </td>
        </tr>
        </table>
        </div>
        </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Header" Runat="Server">
</asp:Content>

